Optimal. Leaf size=50 \[ -\frac{\sqrt{a+\frac{b}{x^2}}}{2 x}-\frac{a \tanh ^{-1}\left (\frac{\sqrt{b}}{x \sqrt{a+\frac{b}{x^2}}}\right )}{2 \sqrt{b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0204868, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {335, 195, 217, 206} \[ -\frac{\sqrt{a+\frac{b}{x^2}}}{2 x}-\frac{a \tanh ^{-1}\left (\frac{\sqrt{b}}{x \sqrt{a+\frac{b}{x^2}}}\right )}{2 \sqrt{b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 335
Rule 195
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \frac{\sqrt{a+\frac{b}{x^2}}}{x^2} \, dx &=-\operatorname{Subst}\left (\int \sqrt{a+b x^2} \, dx,x,\frac{1}{x}\right )\\ &=-\frac{\sqrt{a+\frac{b}{x^2}}}{2 x}-\frac{1}{2} a \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\frac{1}{x}\right )\\ &=-\frac{\sqrt{a+\frac{b}{x^2}}}{2 x}-\frac{1}{2} a \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{1}{\sqrt{a+\frac{b}{x^2}} x}\right )\\ &=-\frac{\sqrt{a+\frac{b}{x^2}}}{2 x}-\frac{a \tanh ^{-1}\left (\frac{\sqrt{b}}{\sqrt{a+\frac{b}{x^2}} x}\right )}{2 \sqrt{b}}\\ \end{align*}
Mathematica [A] time = 0.0293788, size = 68, normalized size = 1.36 \[ -\frac{\sqrt{a+\frac{b}{x^2}} \left (a x^2 \sqrt{\frac{a x^2}{b}+1} \tanh ^{-1}\left (\sqrt{\frac{a x^2}{b}+1}\right )+a x^2+b\right )}{2 x \left (a x^2+b\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.005, size = 85, normalized size = 1.7 \begin{align*} -{\frac{1}{2\,bx}\sqrt{{\frac{a{x}^{2}+b}{{x}^{2}}}} \left ( \sqrt{b}\ln \left ( 2\,{\frac{\sqrt{b}\sqrt{a{x}^{2}+b}+b}{x}} \right ){x}^{2}a-\sqrt{a{x}^{2}+b}{x}^{2}a+ \left ( a{x}^{2}+b \right ) ^{{\frac{3}{2}}} \right ){\frac{1}{\sqrt{a{x}^{2}+b}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.56459, size = 300, normalized size = 6. \begin{align*} \left [\frac{a \sqrt{b} x \log \left (-\frac{a x^{2} - 2 \, \sqrt{b} x \sqrt{\frac{a x^{2} + b}{x^{2}}} + 2 \, b}{x^{2}}\right ) - 2 \, b \sqrt{\frac{a x^{2} + b}{x^{2}}}}{4 \, b x}, \frac{a \sqrt{-b} x \arctan \left (\frac{\sqrt{-b} x \sqrt{\frac{a x^{2} + b}{x^{2}}}}{a x^{2} + b}\right ) - b \sqrt{\frac{a x^{2} + b}{x^{2}}}}{2 \, b x}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.93967, size = 42, normalized size = 0.84 \begin{align*} - \frac{\sqrt{a} \sqrt{1 + \frac{b}{a x^{2}}}}{2 x} - \frac{a \operatorname{asinh}{\left (\frac{\sqrt{b}}{\sqrt{a} x} \right )}}{2 \sqrt{b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23113, size = 61, normalized size = 1.22 \begin{align*} \frac{1}{2} \, a{\left (\frac{\arctan \left (\frac{\sqrt{a x^{2} + b}}{\sqrt{-b}}\right )}{\sqrt{-b}} - \frac{\sqrt{a x^{2} + b}}{a x^{2}}\right )} \mathrm{sgn}\left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]